$(document).ready(function() {
	set_footer_position();
	header_button_action_bind();
	$("#to_personal_home").unbind("hover");
	$("#to_personal_home").css("color", "#FFFFFF");
	$("#select_type_list").toggle(show_blog_list_panel, hidden_blog_list_panel);

	img_button_bind("#cancel_button", "imgs/publish/cancel_button_normal.png", "imgs/publish/cancel_button_hover.png", "imgs/publish/cancel_button_active.png");
	img_button_bind("#publish_button", "imgs/publish/publish_button_normal.png", "imgs/publish/publish_button_hover.png", "imgs/publish/publish_button_active.png");

	$("#cancel_button").click(function() {
		window.location.href = "blog_home.html";
	});

	tag_content_bind();

	form_bind();

	add_tag_bind();
	remove_tag_bind();
	delete_button_bind();
	document.getElementById("current_input").addEventListener("input", listen_tag_change);
});


function form_bind() {
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="content"]', {
			resizeType : 1,
			allowPreviewEmoticons : false,
			allowImageUpload : false,
			items : [
				'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|', 'emoticons', 'image', 'link']
		});
	});
}